From fcaa63cb011d66f05a5ff29f3cb16f1239bd64f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 3 Sep 2025 14:45:32 +0200 Subject: [PATCH] bootstrap: disarm tests that requires git context MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Grünbichler Gbp-Pq: Topic build Gbp-Pq: Name bootstrap-disarm-llvm-config-test-that-requires-git.patch --- src/bootstrap/src/core/builder/tests.rs | 3 +++ src/bootstrap/src/core/config/tests.rs | 6 ++++++ src/bootstrap/src/utils/helpers/tests.rs | 3 +++ 3 files changed, 12 insertions(+) diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 89a0ab7711..2d568f839c 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -443,6 +443,9 @@ fn test_prebuilt_llvm_config_path_resolution() { .join(exe("llvm-config", builder.config.host_target)); assert_eq!(expected, actual); + // Debian: if-unchanged fails for non-git sources + return; + let config = configure( r#" [llvm] diff --git a/src/bootstrap/src/core/config/tests.rs b/src/bootstrap/src/core/config/tests.rs index 802a232e14..23c2937f87 100644 --- a/src/bootstrap/src/core/config/tests.rs +++ b/src/bootstrap/src/core/config/tests.rs @@ -53,6 +53,8 @@ fn download_ci_llvm() { let config = parse("llvm.download-ci-llvm = false"); assert!(!config.llvm_from_ci); + // Debian: if-unchanged doesn't work in non-git context + return; let if_unchanged_config = parse("llvm.download-ci-llvm = \"if-unchanged\""); if if_unchanged_config.llvm_from_ci && if_unchanged_config.is_running_on_ci { let has_changes = if_unchanged_config.has_changes_from_upstream(LLVM_INVALIDATION_PATHS); @@ -474,6 +476,7 @@ fn check_rustc_if_unchanged_paths() { .collect(); for p in normalised_allowed_paths { + if p == "triagebot.toml" { continue }; assert!(config.src.join(p).exists(), "{p} doesn't exist."); } } @@ -556,6 +559,9 @@ fn test_exclude() { #[test] fn test_ci_flag() { + // Debian: if-unchanged doesn't work in non-git context + return; + let config = Config::parse_inner(Flags::parse(&["check".into(), "--ci=false".into()]), |&_| { toml::from_str("") }); diff --git a/src/bootstrap/src/utils/helpers/tests.rs b/src/bootstrap/src/utils/helpers/tests.rs index 9030ca2820..4a29a949c4 100644 --- a/src/bootstrap/src/utils/helpers/tests.rs +++ b/src/bootstrap/src/utils/helpers/tests.rs @@ -102,6 +102,9 @@ fn test_set_file_times_sanity_check() { #[test] fn test_submodule_path_of() { + // Debian: doesn't work in non-git context + return; + let config = Config::parse_inner(Flags::parse(&["build".into(), "--dry-run".into()]), |&_| { Ok(Default::default()) }); -- 2.30.2